#include <iostream>
#include "workerManager.cpp"
using namespace std;
int main(int argc, char const *argv[])
{
	/* test
	Worker * wk = NULL;
	wk = new Employee(1, "Mary", 1);
	wk->showInfo();

	wk = new Manager(2, "Linda", 2);
	wk->showInfo();

	wk = new Boss(3, "Jean", 3);
	wk->showInfo();
	delete wk;
	*/

	WorkerManager * wm = new WorkerManager;
	int choice;
	do
	{
		system("cls");
		wm->showMenu();
		cout<<"please input 0~7:";
		cin>>choice;
		switch(choice)
		{
			case 0: wm->exitSystem();
				break;
			case 1: wm->addEmp();
				break;
			case 2: wm->showEmp();
				break;
			case 3: wm->delEmp();
				break;
			case 4: wm->modifyEmp();
				break;
			case 5: wm->findEmp();
				break;
			case 6: wm->sortEmp();
				break;
			case 7: wm->cleanFile();
				break;
			case 8:	system(".\\staff.exe");
				break;
			default:
				break;
		}
	}while(choice!=0);
	delete wm;
	return 0;
}